package com.code.soulspring.listener;

import com.code.soulspring.listener.event.PointEvent;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * 可多个监听者监听同一个事件，每个监听者对事件做自己的业务处理即可
 * @author lyf
 * @date 2022-09-19 20:33
 */
@Slf4j
@Component
public class PointListener {

    @EventListener
    public void listener(PointEvent pointEvent) {
        // log.info("point event: {}", pointEvent);
    }

    @EventListener
    public void listener2(PointEvent pointEvent) {
        // log.info("point2 event: {}", pointEvent);
    }
}
